<div class="path"><i class="iconfont">&#xf108;</i> <a href="{url('admin/default/welcome')}">开始</a> {$sitename} / <a href="{url('channel/index')}">栏目管理</a>{$path}</div>
<div class="m10">
<div class="table-head fn-clear">
    <div class="fn-l"><a href="{url('channel/index')}" class="button"> <i class="iconfont">&#xf0ca;</i> 列表</a><strong>栏目管理</strong></div>
    <div class="fn-r"><a href="{url('channel/add',array(id=>$pid))}" class="button button-blue link" title="添加栏目"><i class="iconfont" title="添加栏目">&#xf055;</i> 添加栏目</a></div>
</div>
<table class="table">
<thead>
    <tr>
        <th class="fn-tac w40">#</th>
        <th class="fn-tac w200">所属站点</th>
        <th class="fn-tac w80">资源模型</th>
        <th class="fn-tal w60">频道类型</th>
        <th class="fn-tal">分类名称</th>
        <th class="fn-tac w60">扩展模型</th>
        <th class="fn-tac w60">栏目模型</th>
        <th class="fn-tac w80">更新时间</th>
        <th class="fn-tac w60">排序</th>
        <th class="fn-tac w140">操作</th>
    </tr>
</thead>
<tbody>
{loop $list $vo}
<tr>
    <td class="fn-tac">{$vo['id']}</td>
    <td class="fn-tac">{$vo['website_name']}</td>
    <td class="fn-tac"><span class="badge bg-red">{$vo['model_name']}</span></td>
    <td class="fn-tac">{if $vo['type'] == 1}<span class="gray">禁止内容</span>{elseif $vo['type'] == 2}<span class="green">直接跳转</span>{else}<span class="blue">添加内容</span>{/if}</td>
    <td>{if $vo['type'] == 2}{$vo['name']}(URL){else}<a title="查看子分类" href="{url('channel/index',array(id=>$vo['id']))}">{$vo['name']} <a/>{/if}</td>
    <td class="fn-tac">{if $vo['plus_mid'] > 0}<span class="badge bg-blue fb-l">已绑定</span>{else}<span class="badge fb-l">未绑定</span>{/if}</td>
    <td class="fn-tac">{if $vo['exts_mid'] > 0}<span class="badge bg-blue fb-l">已绑定</span>{else}<span class="badge fb-l">未绑定</span>{/if}</td>
    <td class="fn-tac">{date('Y-m-d',$vo['uptime'])}</td>
    <td class="fn-tac"><input name="sorter" class="fn-tac w30 h20" type="text" value="{$vo['neworder']}" fid="{$vo['id']}" /></td>
    <td class="fn-tac tip">
        <a href="{url('channel/edit',array(id=>$vo['id']))}" class="blue" title="编辑">编辑</a>/
        {if $vo['type'] == 2 || $vo['url']}
            <a class="blue" title="点击参看栏目内容" href="{$vo['url']}" target="_blank">预览</a>/
        {else}
            <a class="blue" title="点击参看栏目内容" href="{url('default/lists',array(uid=>$vo['id']))}" target="_blank">预览</a>/
        {/if}
        <a href="###" class="del" title="删除" url="{url('channel/index',array(id=>$vo['id'],act=>del))}">删除</a>
    </td>
</tr>
{/loop}
</tbody>
</table>
<div id="page" class="fn-clear">{$pager}</div>
</div>
<script type="text/javascript">
Do('base','dialog',function(){
    $("input[name='sorter']").blur(function(){
        var id = $(this).attr('fid');
        var sid = $(this).val();
        $.post('{url('channel/uporter')}',{id:id,sorter:sid})
    });
  $('.del').click(function(){$(this).del();});
})
</script>